package com.example.backend.dto;

import lombok.AllArgsConstructor;
import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
@AllArgsConstructor
public class RegisterDto {
    @Pattern(regexp = "^[a-zA-Z0-9_-]{8,16}$", message = "用户名格式错误")
    private String username;
    @Pattern(regexp = "^[a-zA-Z0-9_-]{8,16}$", message = "密码格式错误")
    private String password;
    @Pattern(regexp = "^[a-zA-Z0-9_-]{8,16}$", message = "密码格式错误")
    private String repeatPassword;
}
